package com.smi.service;

import java.io.IOException;

/**
 * @Author: yesiming
 * @Date: 下午2:02 2018/3/29
 */
public class Memory {
    public static String[] CONF;

    static  String URL = "jdbc:mysql://localhost:3306/%s?user=demo&password=demo&useUnicode=true&characterEncoding=UTF8";

    static {
        try {
            CONF = FileUtil.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        resetUrl();
    }

    public static void resetUrl() {
        URL = "jdbc:mysql://" + CONF[0] + ":" + CONF[1]
                + "/%s?user=" + CONF[2]
                + "&password=" + CONF[3]
                + "&useUnicode=true&characterEncoding=UTF8";
    }
}
